package com.rc.pojo.po.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

// Auto generate by mybatis-flex, do not modify it.
public class MemoryTableDef extends TableDef {

    /**
     * 实体类。

 @author 27806
 @since 2024-06-28
     */
    public static final MemoryTableDef MEMORY = new MemoryTableDef();

    public final QueryColumn ID = new QueryColumn(this, "id");

    public final QueryColumn IMG = new QueryColumn(this, "img");

    public final QueryColumn TAG = new QueryColumn(this, "tag");

    public final QueryColumn CON_ID = new QueryColumn(this, "con_id");

    public final QueryColumn ADDRESS = new QueryColumn(this, "address");

    public final QueryColumn CREATE_TIME = new QueryColumn(this, "create_time");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, IMG, TAG, CON_ID, ADDRESS, CREATE_TIME};

    public MemoryTableDef() {
        super("rc", "memory");
    }

    private MemoryTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    public MemoryTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new MemoryTableDef("rc", "memory", alias));
    }

}
